﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using LPY.LeHealth.Service;
using LPY.LeHealth.DTO;
namespace LPY.LeHealth.WebSite.Controllers
{
	/// <summary>
	/// 优惠管理控制器
	/// </summary>
    public class PrivilegeController : BaseController 
    {
        Priservice bll = new Priservice();
		public ActionResult Promotion()
        {
            return View();
        }
        public int addpri()
        {
            string pcont = "";
            string name = Request["name"].ToString();
            if (name == "123")
            {
                pcont = "双十一优惠券";
            }
            if (name == "456")
            {
                pcont = "会员优惠券";
            }
            if (name == "789")
            {
                pcont = "普通会员优惠券";
            }
            if (name!=""||name != "123" || name != "456" || name != "789")
            {
                if (bll.Addpri(name, pcont) ==true)
                {
                    return 1;
                }
                else
                {
                    return 0;
                }
            }
            else
            {
                return 2;
            }
         
        }
    }
}
